﻿using System;
using System.Collections.Generic;
using System.Data;
namespace jutehui.IDAL
{
	/// <summary>
	/// 接口层Product
	/// </summary>
	public interface IProduct
	{	
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		bool Exists(long ProductId);
		/// <summary>
		/// 增加一条数据
		/// </summary>
		long Add(jutehui.Model.Product model);
		/// <summary>
		/// 更新一条数据
		/// </summary>
		bool Update(jutehui.Model.Product model);
		/// <summary>
		/// 删除一条数据
		/// </summary>
		//bool Delete(long ProductId);
		bool DeleteList(string ProductIdlist );
		/// <summary>
		/// 得到一个对象实体
		/// </summary>
	//	jutehui.Model.Product GetModel(long ProductId);
		jutehui.Model.Product DataRowToModel(DataRow row);
		/// <summary>
		/// 获得数据列表
		/// </summary>
		DataSet GetList(string strWhere);
		/// <summary>
		/// 获得前几行数据
		/// </summary>
		DataSet GetList(int Top,string strWhere,string filedOrder);
		int GetRecordCount(string strWhere);
		DataSet GetListByPage(string strWhere, int productId, int pageSize);
        /// <summary>
        /// 获取九块九商品数据
        /// </summary>
        /// <param name="strWhere"></param>
        /// <param name="productId"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        DataSet GetListByPageTeMai(string strWhere, int productId, int pageSize);
		/// <summary>
		/// 根据分页获得数据列表
		/// </summary>
		//DataSet GetList(int PageSize,int PageIndex,string strWhere);
		
	
		/// <summary>
		/// 得到最大ID
		/// </summary>
		int GetMaxId();
	  
        /// <summary>
        /// 整张表数据插入数据库
        /// </summary>
        /// <param name="Tname"></param>
        /// <param name="dt"></param>
        /// <param name="exm"></param>
        /// <returns></returns>
        bool SaveTableData(string Tname, DataTable dt, out string exm);
        /// <summary>
        /// 淘宝九块九模块 整张表数据插入
        /// </summary>
        /// <param name="Tname"></param>
        /// <param name="dt"></param>
        /// <param name="exm"></param>
        /// <param name="isTmalll"></param>
        /// <returns></returns>
        bool SaveTableDataTmall(string Tname, DataTable dt, out string exm, string isTmalll);
        /// <summary>
        /// 小时榜整张表数据存入数据库
        /// </summary>
        /// <param name="Tname"></param>
        /// <param name="dt"></param>
        /// <param name="exm"></param>
        /// <returns></returns>
        bool SaveTableDataToHourTop(string Tname, DataTable dt, out string exm);
		
		/// <summary>
		/// 删除一条数据
		/// </summary>
		bool Delete(long ProductId);
	
		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		jutehui.Model.Product GetModel(long ProductId);
		
		/// <summary>
		/// 根据分页获得数据列表
		/// </summary>
		//DataSet GetList(int PageSize,int PageIndex,string strWhere);
		
		#region  MethodEx

		#endregion  MethodEx
	} 
}
